<!DOCTYPE html>
<html xmlns=http://www.w3.org/1999/xhtml xmlns:bd=http://www.baidu.com/2010/xbdml>
<head>
    <title>编辑权限</title>
    <meta http-equiv="Content-Type" content="text/html" charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    
    <link rel="stylesheet" href="/pc/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/pc/layout/css/font_eolqem241z66flxr.css" media="all" />
    <style>
      .hide{
        display: none;
     }
    </style>
</head>
<body class="childrenBody">
    <form class="layui-form">
    {{ csrf_field() }}
        <div class="layui-form-item">
            <label class="layui-form-label">主题</label>
            <div class="layui-input-block" style="width: 25em;">
                <input type="text" class="layui-input title " lay-verify="required" key="{{$data['id']}}" value="{{$data['title']}}" placeholder="请输入主题">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" >图标</label>
            <div class="layui-input-block" style="width: 25em;">
                <select name="icon"  id="icon" lay-filter="">
                    <option value="">请选择</option>
                    @if(!empty($iconInfo))
                        @foreach($iconInfo as $val)
                            <option value="{{$val['id']}}" @if($data['icon_id']==$val['id']) selected='selected' @endif>{{$val['name']}}</option>
                        @endforeach
                    @endif
                </select>
            </div>
        </div>
         <div class="layui-form-item">
            <label class="layui-form-label">链接</label>
            <div class="layui-input-block" style="width: 25em;">
                <input type="text" class="layui-input  href" lay-verify="" value="{{$data['href']}}" placeholder="请输入链接">
            </div>
         </div>
        <div class="layui-form-item">
            <label class="layui-form-label">模块</label>
            <div class="layui-input-inline" style="width:25em;">
                <select id="auth"  lay-filter="auth" lay-verify="">
                    <option value="">请选择</option>
                    <option value="0" @if($data['level'] == 1) selected @endif>根目录</option>
                    @if($modInfo)
                        @foreach($modInfo as $val)
                            <option value="{{$val['id']}}" @if($data['level'] == 2&&$data['module'] == $val['module']) selected @endif>{{$val['module']}}</option>
                        @endforeach
                    @endif
                </select>
            </div>
        </div>
        <div class="layui-form-item @if($data['level'] == 2) hide @endif"  id="modn" >
            <label class="layui-form-label">模块名称</label>
            <div class="layui-input-block" style="width: 25em;">
                <input type="text" class="layui-input mod " lay-verify="" @if($data['level'] == 1) value="{{$data['module']}}" @endif placeholder="请输入模块名称">
            </div>
         </div>
         <div class="layui-form-item" style="position: relative;">
            <div>
                <label class="layui-form-label">侧边栏默认展开</label>
                <div class="layui-input-block" style="width: 5em;">
                    <input type="checkbox" name="spread" lay-skin="switch" lay-text="是|否" @if($data['spread'] == 1) checked @endif  value="{{$data['spread']}}"  lay-filter="Spread">
                </div>
            </div>
            <div style="position: absolute;top: 0em;left: 10.3em;">
                <label class="layui-form-label">其他代理商可访问</label>
                <div class="layui-input-block" style="width: 5em;">
                   <input type="checkbox" name="limit" lay-skin="switch" lay-text="是|否" @if($data['limit'] == 1) checked @endif  value="{{$data['limit']}}"  lay-filter="Limit">
                </div>
            </div>
            <div style="position: absolute;top: 0em;left: 21.2em;">
                <label class="layui-form-label">在侧边栏显示</label>
                <div class="layui-input-block" style="width: 5em;">
                    <input type="checkbox" name="gadget" lay-skin="switch" lay-text="是|否" @if($data['gadget'] == 1) checked @endif  value="{{$data['gadget']}}"  lay-filter="Gadget">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" admin="{{$data['id']}}" lay-filter="editAuth">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
    <script type="text/javascript" src="/pc/layout/js/jquery.min.js"></script>
    <script type="text/javascript" src="/pc/layui/layui.js"></script>
   <script type="text/javascript" src="/pc/auth/js/edit.js"></script>
</body>
<script>





</script>
</html>